In some image processing, some images (e.g. document images) are divided into three layers of images, i.e. a foreground image, a background image and a mask image. Then, processing may be performed on the three layers of images based upon characteristics of the three layers of images respectively, thereby producing a better processing effect.
However, the background image and the foreground image are generally not smoothed images. For example, the background image possibly does not only contain image pixels for background, but blank pixels are contained at a foreground pixel position in the background image. On the contrary, the foreground image possibly does not only contain image pixels for foreground, but blank pixels are contained at a background pixel position in the foreground image. Sometimes, for example, in order to improve a data compression effect, values of blank pixels in a background image and/or a foreground layer image are necessarily modified (also called filling), so as to obtain a smoothed background image and a smoothed foreground image.
Traditionally, image filling is performed directly in a pixel domain by using an average value of pixels nearby a blank pixel region. A filled image obtained from this method is not smoothed enough.
In addition, a method based upon Discrete Cosine Transform (DCT) and wavelet transform is known, and it performs DCT and wavelet transform and fills an image in a frequency domain. This method is generally very slow, and quantization parameters will influence the quality of filling.
Thus, it is desired to propose a technique capable of solving the above problem.